package com.aabte.permissionframeworklearn.permission.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author Daniel
 */
@Data
public class DeptParam {

    private Long id;

    @NotBlank(message = "部门名称不可以为空！")
    @Length(max = 15, min = 2, message = "部门名称为2-15个字符")
    private String name;

    /**
     * 顶级部门可以为空
     */
    private Long parentId = 0L;

    @NotNull(message = "展示顺序不可以为空")
    private Integer seq;

    @Length(max = 150, message = "备注内容长度不能大于150个字符")
    private String remark;

}
